package edu.suda.LoopCodePlus.mapper;

import edu.suda.LoopCodePlus.entity.Competition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CompetitionMapper {
    /** 插入新的竞赛 */
    void insertCompetition(Competition competition);
    /** 根据竞赛id查询 */
    Competition select_CompetitionById(Integer comId);
    /** 根据竞赛名称查询 */
    List<Competition> select_CompetitionByName(String comName);
    /** 查询所有竞赛 */
    List<Competition> select_AllCompetition();
    /** 根据竞赛id更新竞赛信息 */
    void update_CompetitionById(@Param("comId") Integer comId,@Param("userId") Integer userId,@Param("competition") Competition competition);

}
